<template>
  <div class="home">
    home
    <button @click="handleClick">跳转到详情页</button>
    <button @click="handleMovie">跳转到movieDetail</button>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods:{
    handleClick(){
      // console.log(this);
      var id = 1001;
      this.$router.push(`/detail?id=${id}`);
    },
    handleMovie(){
      var id = 1002;
      this.$router.push(`/movieDetail/${id}`)
    }
  }
}
</script>
